#include "EntryPanel.h"

EntryPanel::EntryPanel(wxWindow* parent,
                       wxString  panelLabel,
                       int       value,
                       bool      drawBox)
          : wxPanel(parent, wxID_ANY)
{
  m_pValue = value;

  m_pHorizBoxSizer  = new wxBoxSizer(wxHORIZONTAL);
  m_pPanelLabel     = new wxStaticText(this, wxID_ANY, panelLabel);
  m_pTextCtrl       = new wxTextCtrl(this, wxID_ANY);
  m_pTextCtrl->SetValue(wxString::Format(wxT("%i"), m_pValue));

  m_pHorizBoxSizer->Add(m_pPanelLabel, wxSizerFlags(2).Expand().Center().Border(wxALL,BORDER_SIZE));
  m_pHorizBoxSizer->Add(m_pTextCtrl, wxSizerFlags(1).Expand().Center().Border(wxALL,BORDER_SIZE));

  // Stack the two horiz sizers on top of each other
  m_pStaticBox      = new wxStaticBox(this, wxID_ANY, wxT(NULL_STRING));
  m_pStaticBoxSizer = new wxStaticBoxSizer(m_pStaticBox, wxVERTICAL);
  m_pStaticBoxSizer->Add(m_pHorizBoxSizer, wxSizerFlags(1).Expand().Center().Border(wxALL,BORDER_SIZE));

  SetSizerAndFit(m_pStaticBoxSizer);
}

EntryPanel::~EntryPanel()
{
}

BEGIN_EVENT_TABLE ( EntryPanel, wxPanel)

END_EVENT_TABLE()
